#ifndef GAMEUPDATE_H
#define GAMEUPDATE_H

#include <QFrame>
#include <QTimer>
#include "datamodel.h"


namespace Ui {
class GameUpdate;
}

class GameUpdate : public QFrame
{
    Q_OBJECT
    
public:
    explicit GameUpdate(QWidget *parent = 0);
    explicit GameUpdate(DataModel *model,QWidget *parent = 0);
    ~GameUpdate();
    void setupUi();
signals:
    void changeLock(bool b);
    void changeItem();
    void resetUi();
    void syncGameSI(const int &id);

private slots:
    void updateTimerCallBack();

    void on_btn_startUpdate_clicked();

    void on_btn_openGamedisk_clicked();

    void on_btn_openGameDir_clicked();

    void on_btn_sync_clicked();

    void on_btn_ensure_clicked();

    void on_btn_cancel_clicked();

private:
    Ui::GameUpdate *ui;
    DataModel *model;
    QTimer *updateTimer;
    int updateValue ;
};

#endif // GAMEUPDATE_H
